package com.hj.dapp.business.menu.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @author 胡奥程
 * @version 1.0
 * @date 2023/12/30
 */
@Schema(title = "菜单模型", description = "menu")
@TableName("menu")
@Data
public class Menu {
    @Schema(name = "ID", description = "用户ID属性", format = "int64", example = "1")
    @TableId(type = IdType.AUTO)
    private Long id;
    @Schema(name = "父菜单Id", example = "1")
    private Long parentId;
    @Schema(name = "菜单名称", example = "配置中心")
    private String name;
    @Schema(name = "菜单url", example = "/config/user")
    private String url;
    @Schema(name = "权限表达式", example = "/config/user")
    private String perms;
    @Schema(name = "类型", example = "0",description = "0:目录，1：菜单，2：按钮")
    private Integer type;
    @Schema(name = "菜单图标", example = "el-icon-arrow-down")
    private String icon;
    @Schema(name = "菜单序号", example = "1")
    private Integer orderNum;
    @Schema(name = "创建人", example = "huaocheng")
    private String createBy;
    @Schema(name = "创建时间",type = "dateTime", example = "2023-12-30 05:00:12")
    private LocalDateTime createTime;
    @Schema(name = "更新人", example = "jiawenbo")
    private String lastUpdateBy;
    @Schema(name = "更新时间",type = "dateTime", example = "2023-12-30 05:00:12")
    private LocalDateTime lastUpdateTime;
    @Schema(name = "删除标志",format = "int64", example = "0")
    private Integer delFlag;
    @Schema(name = "子菜单列表")
    @TableField(exist = false)
    private List<Menu> children;

}
